package com.zhengtoon.mctoon.conv.utils;

import java.util.concurrent.TimeUnit;

/**
 * 应用常量
 *
 * @author liuzhenhua
 * @since 2017-05-09
 */
public class AppConstant {

    public static final String FAIL_CODE = "201";//失败的返回码
    public static final String ERROR_CODE = "202";//错误的返回码

    /**
     * userId前缀
     */
    public final static String CONV_USER_PREFIX = "MCT_CONV_USER_";

    /**
     * session前缀
     */
    public final static String CONV_SESSION_PREFIX = "MCT_CONV_SESSION_";

    /**
     * 缓存的时间单位
     */
    public static final TimeUnit CONV_REDIS_CACHE_TIME_UNIT = TimeUnit.MINUTES;
    /**
     * http header key
     */
    public static final String CONV_HTTP_HEADER_KEY = "sessionId";

    /**
     * 存储在request对象中的属性名称
     */
    public static final String REQ_SESSION_ATTR_KEY = "req_attr_key_session_";

    /**
     * 通知模板
     */

    public static final String MSG_SUMMARY_TEMPLATE = "您有一条新的随手拍消息";

    public static final String MSG_CATALOG_TEMPLATE = "随手拍";

    public static final Integer CONV_CONTENT_LENGH_LIMIT = 10;
    public static final Integer CONV_PHOTO_NUM_LIMIT = 6;


    // 审核不通过消息体
    public static final String MSG_COMMIT_CONTENT_NOT_PASS = "内容审核通知\n发布内容：%s\n发布时间：%s\n审核结果：未通过\n原因如下\n%s";
    // 审核通过,大赞北京 实名
    public static final String MSG_COMMIT_CONTENT_PASS_CERT = "内容审核通知\n发布内容：%s\n发布时间：%s\n审核结果：审核通过\n发布栏目：%s\n获得积分：%s，%s";
    // 审核通过,大赞北京 实名 无城市积分
    public static final String MSG_COMMIT_CONTENT_PASS_CERT_NO_CITY = "内容审核通知\n发布内容：%s\n发布时间：%s\n审核结果：审核通过\n发布栏目：%s\n";
    // 审核通过,大赞北京 非实名
    public static final String MSG_COMMIT_CONTENT_PASS_NOT_CERT = "内容审核通知\n发布内容：%s\n发布时间：%s\n审核结果：审核通过\n发布栏目：%s\n获得积分：%s，%s\n积分条件：请先完成实名认证";
    // 审核通过,大赞北京 非实名 无城市积分
    public static final String MSG_COMMIT_CONTENT_PASS_NOT_CERT_NO_CITY = "内容审核通知\n发布内容：%s\n发布时间：%s\n审核结果：审核通过\n发布栏目：%s\n";
    // 审核通过,投诉 实名
    public static final String MSG_COMMIT_CONTENT_PASS_REPORT_CERT = "内容审核通知\n发布内容：%s\n发布时间：%s\n审核结果：审核通过\n获得积分：%s，%s\n当前状态：客服正在处理中";
    // 审核通过,投诉 实名 无城市积分
    public static final String MSG_COMMIT_CONTENT_PASS_REPORT_CERT_NO_CITY = "内容审核通知\n发布内容：%s\n发布时间：%s\n审核结果：审核通过\n当前状态：客服正在处理中";
    // 审核通过,投诉 非实名
    public static final String MSG_COMMIT_CONTENT_PASS_REPORT_NOT_CERT = "内容审核通知\n发布内容：%s\n发布时间：%s\n审核结果：审核通过\n获得积分：%s，%s\n积分条件：请先完成实名认证\n当前状态：客服正在处理中";
    // 审核通过,投诉 非实名
    public static final String MSG_COMMIT_CONTENT_PASS_REPORT_NOT_CERT_NO_CITY = "内容审核通知\n发布内容：%s\n发布时间：%s\n审核结果：审核通过\n当前状态：客服正在处理中";
    // 客服自处理每个环节时
    public static final String MSG_COMMIT_CONTENT_DEAL_NODE = "问题处理跟进通知\n发布内容：%s\n发布时间：%s\n处理途径：%s\n处理结果：%s\n当前状态：%s";
    // 提交首都之窗消息模板
    public static final String MSG_COMMIT_CONTENT_BJ_WINDOWN = "问题处理跟进通知\n发布内容：%s\n发布时间：%s\n处理途径：%s\n处理结果：%s\n当前状态：%s";
    // 审核办结时确认结果
    public static final String MSG_COMMIT_CONTENT_IS_OVER = "问题处理办结通知\n发布内容：%s\n发布时间：%s\n处理途径：%s\n处理结果：%s\n当前状态：%s";

    /**
     * 通知跳转路径
     */
    // 未通过审核
    public static final String MSG_NOT_PASS_URL = "/conv-photo/index.html";
    // 审核通过,大赞北京,社会警示 实名
    public static final String MSG_PASS_CERT_URL = "/conv-photo/index.html";
    // 审核通过,大赞北京,社会警示 非实名
    public static final String MSG_PASS_NOT_CERT_URL = "/conv-photo/index.html";
    // 举报 实名
    public static final String MSG_PASS_CERT_REPROT_URL = "/conv-photo/index.html";
    // 举报 非实名
    public static final String MSG_PASS_NOT_CERT_REPROT_URL = "/conv-photo/index.html";
    // 提交首都之窗通知模板
    public static final String MSG_REPORT_BJ_WINDOW_URL = "/conv-photo/index.html";
    // 审核未办结时确认结果
    public static final String MSG_REPORT_SERVICE_NOT_OVER_URL = "/conv-photo/index.html";
    // 审核办结时确认结果
    public static final String MSG_REPORT_SERVICE_IS_OVER_URL = "/conv-photo/index.html";

    // 通知状态:已完成
    public static final Integer MSG_FINISH_FLAG_YES = 1;
    // 通知状态:未完成
    public static final Integer MSG_FINISH_FLAG_NO = 0;

    // 举报处理状态 - 未办结
    public static final String MSG_HANDLE_NOT_OVER = "继续跟进处理";
    // 举报处理状态 - 已办结办结
    public static final String MSG_HANDLE_OVER = "已办结";


    public static final String TOON_CODE_TYPE_MSG = "msg";

    public static final String DEFORT_TIME_FORMAT_PATTERN = "yyyy-MM-dd HH:mm:ss";

    // 倒序
    public static final Integer SORT_IS_ASC_YES = 1;
    // 正序
    public static final Integer SORT_IS_ASC_NO = 2;

    // 展示
    public static final Integer SHOW_FLAG_YES = 1;
    // 不展示
    public static final Integer SHOW_FLAG_NO = 2;

    /**
     * button
     */
    // 未通过审核
    public static final String MSG_COMMIT_CONTENT_NOT_PASS_BUTTON = "重新编辑";
    // 审核通过,详情 实名
    public static final String MSG_BUTTON_DETAIL = "去看看";
    // 审核办结时确认结果
    public static final String MSG_COMMIT_CONTENT_IS_OVER_BUTTON = "去评价";

    /**
     * 企通平台redis前缀
     */
    public final static String QITOON_PREFIX_CACHE_KEY = "tob-sessionid:";


    /**
     * 待审核状态
     */

    public final static Integer CONV_AUDIT_CODE = 1;
    public final static String CONV_AUDIT = "待审核";

    public final static Integer CONV_AUDIT_NOT_PASS = 1;
    public final static Integer CONV_AUDIT_PASS = 2;

    /**
     * 审核结果编码: 1:待处理 2. 审核不通过  3. 审核通过
     */
    public final static Integer CONV_AUDIT_CODE_DEFAULT = 1;
    public final static Integer CONV_AUDIT_CODE_NOT_PASS = 2;
    public final static Integer CONV_AUDIT_CODE_PASS = 3;


    public final static String CONV_AUDIT_CODE_DEFAULT_VALUE = "待处理";
    public final static String CONV_AUDIT_CODE_PASS_VALUE = "审核通过";
    public final static String CONV_AUDIT_CODE_NOT_PASS_VALUE = "审核不通过";

    public final static Integer DEAL_TYPE_PRAISE_BJ = 1;
    public final static Integer DEAL_TYPE_REPORT = 2;

    public final static Integer CONV_IS_NOT_OVER = 1;
    public final static Integer CONV_IS_OVER = 2;
    public final static Integer CONV_IS_OVER_DEFAULT = 0;

    public final static Integer HANDLE_MODEL_SERVICE = 1;
    public final static Integer HANDLE_MODEL_BJ_WINDOW = 2;

    public final static String HANDLE_MODEL_SERVICE_VALUE = "客服自处理";
    public final static String HANDLE_MODEL_BJ_WINDOW_VALUE = "提交到首都之窗";

    public final static Integer CONV_PRAISE_BJ = 1;// 大赞北京
    public final static Integer CONV_REPORT = 2;//举报处理
    public final static Integer CONV_PRAISE_SOCIAL_WARN = 3;// 社会警示

    // 用户反馈
    public final static Integer CONV_FEEDBACK_YES = 2; // 用户满意
    public final static Integer CONV_FEEDBACK_NO = 1; // 用户不满意

    public final static String CONV_FEEDBACK_YES_VALUE = "满意"; // 用户满意
    public final static String CONV_FEEDBACK_NO_VALUE = "不满意"; // 用户不满意

    /**
     * 其他类型的拒绝原因 dict key
     */
    public final static Integer OTHER_REJECT_DICT_CODE = 99;

    /**
     * 记录锁定时间 分钟
     */
    public static final Integer LOCK_MINUTES = -5;

    /**
     * 内部信件id前缀
     */

    public static final String BJT_SYS_LETTER_ID_PREFIX = "BJT_";

    /**
     * 北京通信件内部状态
     */

    public static final Integer BJT_SYS_LETTER_STATUS_SUBMIT = 1;  // 已提交(未回复)

    public static final Integer BJT_SYS_LETTER_STATUS_REPLY = 2;  // 已回复

    public static final Integer BJT_SYS_LETTER_STATUS_FEEDBACK = 3;   // 已评价

    /**
     * 通知模板
     */
    public static final String MSG_TEMPLATE = "信件标题：%s\n官方回复：%s";

//    public static final String MSG_SUMMARY_TEMPLATE = "您有一条新的%s";

    public static final Integer BJT_LETTER_TYPE_ZIXUN = 1;
    public static final Integer BJT_LETTER_TYPE_JIANYI = 2;
    public static final Integer BJT_LETTER_TYPE_TOUSU = 4;

    public static final Integer NOT_ACCEPT_LETTER_BJT_STATUS = 4;

    public static final String BJ_WINDOW_HANDLE_CHANNEL = "提交政风行风热线";
    public static final String BJ_WINDOW_HANDLE_RESULT = "等待政风行风热线反馈结果";

    public static final Integer SUBJECT_STATUS_SHELVE = 1; //专题状态:上架
    public static final Integer SUBJECT_STATUS_NOT_SHELVE = 0; //专题状态:下架
    public static final Integer SUBJECT_SORT_VALUE_DEFALUT = 0;//sort字段默认状态
    public static final boolean SUBJECT_IS_EDIT = true;
    public static final boolean SUBJECT_IS_NOT_EDIT = false;

    public static final Integer SHELVE_SUBJECT_COUNT_LIMIT_DEFAULT = 5; // 如果disconf中无配置,默认为5
}
